#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

char *add(char num1[], char num2[])
{
    int len1 = strlen(num1);
    int len2 = strlen(num2);
    int len = len1 > len2 ? len1 : len2;
    int anslen = len ;
    int *intans = (int *)calloc(len + 1, sizeof(int));
    char *strans = (char *)malloc(len + 2 * sizeof(char));
    for (int i = 0; i < len1; i++)
    {
        intans[len1-1-i] += num1[i] - '0';
    }

    for (int i = 0; i < len2; i++)
    {
        intans[len2-1-i] += num2[i] - '0';
    }

    for (int i = 0; i <len; i++)
    {
        intans[i + 1] += intans[i] / 10;
        intans[i] %= 10;
    }
    
    if(intans[len])
    anslen++;

    if (!anslen)
    {
        strans[0] = '0';
        strans[1] = '\0';
    }
    else
    {
        for (int i = 0; i < anslen; i++)
        {
            strans[anslen - 1 - i] = intans[i] + '0';
        }
        strans[anslen] = '\0';
    }

    free(intans);
    return strans;
}

int main()
{
    char a[2001], b[2001];
    scanf("%s", a);
    scanf("%s", b);
    puts(add(a, b));
}
